package com.hjh.java.springboot.aspect.controller;

import com.hjh.java.springboot.aspect.bean.dto.OrderDto;
import com.hjh.java.springboot.aspect.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/aop")
public class AspectsController {

    @Autowired
    private IOrderService orderService;

    @PostMapping("/test1")
    public String test1(){
        return "helloword!";
    }


    @PostMapping("/query-order")
    public List<OrderDto> queryOrder(){
        return orderService.queryOrder();
    }
}
